<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<html>
<head>
<title>金融机构</title>
<script type="text/javascript">
	function jumpPage(page) {
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/system/financial/index.do?currentPage="+page;
		searchForm.submit();
	}
	function editData(id) {
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/system/financial/toUpdate.do?currentPage=${currentPage}&f.id="+id;
		searchForm.submit();
	}
	function view(id) {
		var searchForm = document.searchForm;
		searchForm.action = "<s:property value='contextPath'/>/system/financial/view.do?currentPage=${currentPage}&f.id="+id;
		searchForm.submit();
	}
		
	function deleteData(id) {
		if(confirm("确认要删除吗?")) {
			var searchForm = document.searchForm;
			searchForm.action = "<s:property value='contextPath'/>/system/financial/delete.do?currentPage=${currentPage}&f.id="+id;
			searchForm.submit();
		}	  
	}
	
	function clear1(){
		document.getElementById("name").value="";
		document.getElementById("manager").value="";
		document.getElementById("billing").selectedIndex=0;
	}
</script>
</head>
<body>
<div class="navigation">
	    <span>
	    <a href="javascript:window.history.forward();"><img src="${contextPath}/images/go_nav_btn.png" /></a>
	     <a href="javascript:window.history.forward();">前进</a>
	    <a href="javascript:window.location.reload();"><img src="${contextPath}/images/refresh_nav_btn.png" /></a>
	     <a href="javascript:window.location.reload();">刷新</a>
	    </span>系统管理&gt;&gt;金融机构管理
    </div>
	<div class="xt_main_right_center">
		<form action="index.do" name="searchForm" method="post">
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				style="border-color: #CCCCCC;">
				<tr>
					<td class="right-td-width-bg">金融机构名称：</td>
					<td width="20%"><input type="text" id="name" name="search.name" value="${search.name }" class="input"/></td>
					<td class="right-td-width-bg">客户经理：</td>
					<td width="20%"><input type="text" id="manager" name="search.manager" value="${search.manager }" class="input" /></td>
					<td class="right-td-width-bg">是否独立开票：</td>
					<td width="20%">
						<select name="search.billing" class="input" id="billing">
							<option value="-1">--请选择--</option>
							<option value="0" <s:if test="search.billing==0">selected</s:if>>是</option>
							<option value="1" <s:if test="search.billing==1">selected</s:if>>否</option>
						</select>
					</td>
				</tr>
				<tr
					style="background:url(${contextPath}/images/xt_main_right_dhbj.jpg) repeat-x;">
					<td height="28" colspan="6" align="right"
						style="border-bottom: none;"><input type="button"
						class="btn_clear_form" value="" onclick="clear1()"/> <input name="" type="submit"
						name="submit" value="" class="btn_query" /></td>
				</tr>
			</table>
		</form>
	</div>
	<br />
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		  <tr>
		    <td height="25" align="left"><font color="#0066CC"><strong>查询结果：</strong></font></td>
		    <td height="25" align="right">
		    <jysz:permission code="SYS_FIN_ADD">
		  	  <a href="toAdd.do"><img src="${contextPath}/images/btn_add.png" alt="新增" /></a>
		  	  </jysz:permission>
            </td>
		  </tr>
		</table>
		
			<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
				<tr>
					<td class="top-td-width-bg">序号</td>
					<td class="top-td-width-bg">金融机构名称</td>
					<td class="top-td-width-bg">是否独立开票</td>
					<td class="top-td-width-bg">客户经理</td>
					<td class="top-td-width-bg">联系电话</td>
					<td class="top-td-width-bg">操作</td>
				</tr>
				<s:iterator value="page.result" status="i" id="fi">
					<tr>
						<td class="down-center-td-width-bg">${i.count }</td>
						<td class="down-center-td-width-bg">${fi.name }</td>
						<td class="down-center-td-width-bg">${fi.billing==0?'是':'否 '}</td>
						<td class="down-center-td-width-bg">${fi.manager }</td>
						<td class="down-center-td-width-bg">${fi.telephone }</td>
						<td class="down-center-td-width-bg">
							<a href="javascript:view(${fi.id })" title="详情"><img src="${contextPath}/images/chakan.gif" alt="详情" width="16" height="18" border="0" /></a>
							<jysz:permission code="SYS_FIN_EDIT">
							<a href="javascript:editData(${fi.id })" title="编辑"><img src="${contextPath}/images/edit.gif" alt="编辑" width="16" height="13" border="0" /></a>
			    			</jysz:permission>
			    			<jysz:permission code="SYS_FIN_DEL">
			    			<a href="javascript:deleteData(${fi.id })" title="删除"><img src="${contextPath}/images/del.gif" alt="删除" width="16" height="13" border="0" /></a>
							</jysz:permission>
						</td>
					</tr>
				</s:iterator>
				<tr>
			<td height="36" class="down-center-td-width-bg" align="right"
				colspan="9"><%@ include
					file="/WEB-INF/view/common/pagination.jsp"%>
			</td>
		</tr>
			</table>
</body>
</html>